#!/usr/bin/python

import os
import sys

CWEBP = '/usr/local/bin/cwebp'
for file in os.listdir(sys.argv[1]):
	f,ext = os.path.splitext(file)
	command = '%s -preset text %s -o %s/webp/%s.webp' % (CWEBP, os.path.abspath(file), sys.argv[1], f)
	os.system(command)


